package cn.cj.erp.common.enums;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 是否枚举
 * @author chenjian
 */
public enum YesNoEnum implements BaseEnum {
    YES("1", "是"),
    NO("0", "否");

    @JsonValue
    private final String value;
    private final String label;

    YesNoEnum(String value, String info) {
        this.value = value;
        this.label = info;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    public boolean isYes() {
        return this.equals(YES);
    }

    public boolean isNo() {
        return this.equals(NO);
    }
}
